package li;
import java.util.LinkedList;
import java.util.Iterator;
public class demo17 {
	public static void main(String args[]){
		LinkedList<String> link=new LinkedList<>();
		
		link.addLast("buick");
		link.addLast("audi");
		link.add("benz");
		System.out.println(link);
		
		Iterator<String> i=link.iterator();
		while(i.hasNext()){
			System.out.println(i.next());
		}
		
	}
	
	
}
